# apps/rooms/views.py
from rest_framework.views import APIView
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from .models import Room
from rest_framework import status

class RoomListView(APIView):
    permission_classes = [AllowAny]
    def get(self, request):
        data = list(Room.objects.values('room_id', 'name'))
        return Response(data, status=status.HTTP_200_OK)